<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class AddOrderTypeToSignOrder extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('open_shop_sign_order', function (Blueprint $table) {
            $table->unsignedTinyInteger('orderType')
                  ->default(\App\Enums\OpenShop\InvestmentPromotion\SignOrderEnum::ORDER_TYPE_COMMON)
                  ->comment('订单类型 0普通 1手动导入');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('open_shop_sign_order', function (Blueprint $table) {
            $table->dropColumn('orderType');
        });
    }
}
